package cn.com.dcsgo.service.impl;

import cn.com.dcsgo.domain.entity.Notification;
import cn.com.dcsgo.mapper.NotificationMapper;
import cn.com.dcsgo.service.NotificationService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * NotificationServiceImpl
 *
 * @author Dcsgo
 * @since 2025/4/3 15:09
 */
@Service
public class NotificationServiceImpl extends ServiceImpl<NotificationMapper, Notification> implements NotificationService {
    @Override
    public List<Notification> getByUserId(Long userId) {
        LambdaQueryWrapper<Notification> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(Notification::getUserId, userId);
        return baseMapper.selectList(wrapper);
    }
}
